function filterArray(datalist){
    const addressArr = [...new Set([...new Set(datalist.map(item => {
        let arr = []
        arr.push(item.address)
        return arr
    }))].flat())];

    const resultArr = [];
    for (let i = 0; i < addressArr.length; i++) {

        let obj = {}

        obj.name = addressArr[i]

        obj.value = datalist.filter(item => {
            if (item.address === addressArr[i]) {
                return item.id
            }
        }).length

        resultArr.push(obj)


    }

    return resultArr
}

export default filterArray